Previous Book Contents Book Index Next

Inside Macintosh: AppleScript Language Guide / Part 2 - AppleScript Language Reference


Chapter 8 - Handlers

Handlers are collections of statements that are executed in response to commands or error messages.

This chapter describes


Chapter Contents
Using Subroutines
Types of Subroutines
Scope of Subroutine Calls in Tell Statements
Checking the Classes of Subroutine Parameters
Recursive Subroutines
Saving and Loading Libraries of Subroutines
Subroutine Definitions and Calls
Subroutines With Labeled Parameters
Examples of Subroutines With Labeled Parameters
Subroutines With Positional Parameters
Examples of Subroutines With Positional Parameters
The Return Statement
Command Handlers
Command Handlers for Script Applications
Run Handlers
Open Handlers
Handlers for Stay-Open Script Applications
Idle Handlers
Quit Handlers
Interrupting a Script Application's Handlers
Calling a Script Application
Scope of Script Variables and Properties
Scope of Properties and Variables Declared at the Top Level of a Script
Scope of Properties and Variables Declared in a Script Object
Scope of Variables Declared in a Handler

Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 JUL 1996